//
//  HomeActivityCell.m
//  爱鲜蜂
//
//  Created by 廖易诚 on 16/8/31.
//  Copyright © 2016年 itcast. All rights reserved.
//

#import "HomeActivityCell.h"

@interface HomeActivityCell ()

///
@property (nonatomic, strong) UIImageView *iconImageView;

@end

@implementation HomeActivityCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.backgroundColor = [UIColor colorWithRed:249/255.0 green:247/255.0 blue:247/255.0 alpha:1];
        UIImageView *iconImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:iconImageView];
        self.iconImageView = iconImageView;
        
    
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    self.iconImageView.hm_x = 10;
    self.iconImageView.hm_y = 10;
    self.iconImageView.hm_width = [UIScreen hm_screenWidth] - 20;
    self.iconImageView.hm_height = self.hm_height - 10;
    NSLog(@"self.imageView.hm_width=%f",self.iconImageView.hm_width);
    NSLog(@"self.imageView.hm_height=%f",self.iconImageView.hm_height);
    
    

   
}
//
- (void)setImageStr:(NSString *)imageStr {
    _imageStr = imageStr;
    
    [self.iconImageView sd_setImageWithURL:[NSURL URLWithString:imageStr] placeholderImage:[UIImage imageNamed:@"icon_icons_holder"]];
}

@end
